package com.ysd.lis.entity.bac;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ysd.lis.entity.BaseEntity;
import com.ysd.lis.entity.BaseEntity2;
import com.ysd.lis.entity.BaseEntityJpa;
import com.ysd.lis.util.compare.Compare;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.sql.Timestamp;
import java.util.List;

/**
 * <p>
 * 微生物检验应用培养基
 * </p>
 *
 * @author cfz
 * @since 2024-04-11
 */
@Entity
@Table(name = "BAC_TEST_CUL_MEDIUM")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "BAC_TEST_CUL_MEDIUM", autoResultMap = true)
public class BacTestCultureMedium extends BaseEntityJpa {

    private static final long serialVersionUID = 1L;

    /**
     * 标本号
     */
    @Column(name = "SAMPLE_NO")
    @TableField("SAMPLE_NO")
    private String sampleNo;

    /**
     * 报告单元
     */
    @Column(name = "RPT_GROUP")
    @Compare("报告单元")
    @TableField("RPT_GROUP")
    private String rptGroup;

    /**
     * 检验日期
     */
    @Column(name = "SAMPLEDA")
    @TableField("SAMPLEDA")
    private Timestamp sampleda;

    @Column(name = "TEST_FLOW_NO")
    @TableField("TEST_FLOW_NO")
    private String testFlowNo;


    /**
     * 申请号
     */
    @Column(name = "REQ_NO")
    @TableField("REQ_NO")
    private String reqNo;

    /**
     * 类别
     */
    @Column(name = "KIND")
    @TableField("KIND")
    private String kind;

    /**
     * 条码
     */
    @Column(name = "BARCODE")
    @TableField("BARCODE")
    private String barcode;


    /**
     * 培养基编号
     */
    @Column(name = "CUL_MEDIUM_NO")
    @TableField("CUL_MEDIUM_NO")
    private String cultureNo;

    /**
     * 培养基名称
     */
    @Column(name = "CUL_MEDIUM_NA")
    @TableField("CUL_MEDIUM_NA")
    private String cultureNa;


    /**
     * 培养基组合编号
     */
    @Column(name = "CUL_COMBINA_NO")
    @TableField("CUL_COMBINA_NO")
    private String cultureCombinNo;

    /**
     * 培养基组合名称
     */
    @Column(name = "CUL_COMBINA_NA")
    @TableField("CUL_COMBINA_NA")
    private String cultureCombinNa;

    /**
     * 是否打印条码 0否  1 是
     */
    @Column(name = "IS_PRINT_LABEL")
    @TableField("IS_PRINT_LABEL")
    private Integer isPrintLabel;

    /**
     * 打印容器条码次数
     */
    @Column(name = "PRINT_LABEL_COUNT")
    @TableField("PRINT_LABEL_COUNT")
    private Integer printLabelCount;

    /**
     * 序号
     */
    @Column(name = "SEQ")
    @TableField("SEQ")
    private Integer seq;

    /**
     * 所属培养基/父培养基/由XX培养基转中(分纯)到本培养基
     */
    @Column(name = "PARENT_ID")
    @TableField("PARENT_ID")
    private String parentId;

    /**
     * 自动编号，微生物申请签收时自动生成的 培养基编号
     */
    @Column(name = "AUTO_NO")
    @TableField("AUTO_NO")
    private String autoNo;

    /**
     * 流程方案节点主键
     */
//    @TableField("WORK_FLOW_NODE_ID")
//    private String workFlowNodeId;

    /**
     * 流程节点编号
     */
    @Transient
    @TableField(exist = false)
    private String workFlowNodeDictNo;

    /**
     * 流程节点名称
     */
    @Transient
    @TableField(exist = false)
    private String workFlowNodeDictNa;


    /**
     * 血量
     */
    @Transient
    @TableField(exist = false)
    private String bloodVal;

    /**
     * 总重量
     */
    @Transient
    @TableField(exist = false)
    private String totalWeight;

    /**
     * 最小血量
     */
    @Transient
    @TableField(exist = false)
    private String minBloodVal;

    /**
     * 最小总重量
     */
    @Transient
    @TableField(exist = false)
    private String minTotalWeight;

    /**
     * 培养瓶重量
     */
    @Transient
    @TableField(exist = false)
    private String cultuMedWeight;

    /**
     * 容器条码前缀
     */
    @Transient
    @TableField(exist = false)
    private String cultuMedBarCodePrefix;

    /**
     * 容器条码长度
     */
    @Transient
    @TableField(exist = false)
    private String cultuMedBarCodeLength;

    /**
     * 是否自动弹出
     */
    @Transient
    @TableField(exist = false)
    private Boolean isAutoPopup;

    /**
     * 选用培养基 血培养  转种 子集
     */
    @Transient
    @TableField(exist = false)
    private List<BacTestCultureMedium> children;

    /**
     * 培养基类型  1、培养基  2、培养瓶
     */
    @Transient
    @TableField(exist = false)
    private String mediumType;

    /**
     * 培养基颜色
     */
    @Transient
    @TableField(exist = false)
    private String mediumColor;

    /**
     * 培养基样式标签
     */
    @Transient
    @TableField(exist = false)
    private String mediumTag;

    /**
     * 标签数
     */
    @Transient
    @TableField(exist = false)
    private Integer tagsNum;

    @Transient
    @TableField(exist = false)
    private Integer isAlarm;

    @Transient
    @TableField(exist = false)
    private Integer isPositive;

    /**
     * 不打印标签
     */
    @Transient
    @TableField(exist = false)
    private Boolean isPrintLabels;

    /**
     * 培养瓶名称
     */
    @Transient
    @TableField(exist = false)
    private String cultureBottle;
}
